<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>API: yuitest   TestManager.js  (YUI Library)</title>
	<link rel="stylesheet" type="text/css" href="assets/api.css">
    <script type="text/javascript" src="assets/api-js"></script>
    <script type="text/javascript" src="assets/ac-js"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">

	<div id="hd">
        <a href="http://developer.yahoo.com/yui/"><h1>Yahoo! UI Library</h1></a>
        <h3>yuitest&nbsp; <span class="subtitle">2.3.1</span></h3>
        <p>
        <a href="./index.html">Yahoo! UI Library</a> 
            &gt; <a href="./module_yuitest.html">yuitest</a>
                
                 &gt; TestManager.js (source view) 
            </p>

	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form name="yui-classopts-form">
    <span id="classopts"><input type="checkbox" name="showprivate" id="showprivate" /> Show Private</span>
    <span id="classopts"><input type="checkbox" name="showprotected" id="showprotected" /> Show Protected</span>
            </form>

                    <div id="srcout">
                        <style>
                            #doc3 #classopts { display:none; }
                        </style>
<div class="highlight" ><pre><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">namespace</span><span class="o">(</span><span class="s2">&quot;tool&quot;</span><span class="o">);</span>

<span class="c">//-----------------------------------------------------------------------------</span>
<span class="c">// TestManager object</span>
<span class="c">//-----------------------------------------------------------------------------</span>
<span class="c"></span>
<span class="c">/**</span>
<span class="c"> * Runs pages containing test suite definitions.</span>
<span class="c"> * @namespace YAHOO.tool</span>
<span class="c"> * @class TestManager</span>
<span class="c"> * @static</span>
<span class="c"> */</span>
<span class="nx">YAHOO</span><span class="o">.</span><span class="nx">tool</span><span class="o">.</span><span class="nx">TestManager</span> <span class="o">=</span> <span class="o">{</span>

    <span class="c">/**</span>
<span class="c">     * Constant for the testpagebegin custom event</span>
<span class="c">     * @property TEST_PAGE_BEGIN_EVENT</span>
<span class="c">     * @static</span>
<span class="c">     * @type string</span>
<span class="c">     * @final</span>
<span class="c">     */</span>
    <span class="nx">TEST_PAGE_BEGIN_EVENT</span> <span class="c">/*:String*/</span> <span class="o">:</span> <span class="s2">&quot;testpagebegin&quot;</span><span class="o">,</span>

    <span class="c">/**</span>
<span class="c">     * Constant for the testpagecomplete custom event</span>
<span class="c">     * @property TEST_PAGE_COMPLETE_EVENT</span>
<span class="c">     * @static</span>
<span class="c">     * @type string</span>
<span class="c">     * @final</span>
<span class="c">     */</span>
    <span class="nx">TEST_PAGE_COMPLETE_EVENT</span> <span class="c">/*:String*/</span> <span class="o">:</span> <span class="s2">&quot;testpagecomplete&quot;</span><span class="o">,</span>

    <span class="c">/**</span>
<span class="c">     * Constant for the testmanagerbegin custom event</span>
<span class="c">     * @property TEST_MANAGER_BEGIN_EVENT</span>
<span class="c">     * @static</span>
<span class="c">     * @type string</span>
<span class="c">     * @final</span>
<span class="c">     */</span>
    <span class="nx">TEST_MANAGER_BEGIN_EVENT</span> <span class="c">/*:String*/</span> <span class="o">:</span> <span class="s2">&quot;testmanagerbegin&quot;</span><span class="o">,</span>

    <span class="c">/**</span>
<span class="c">     * Constant for the testmanagercomplete custom event</span>
<span class="c">     * @property TEST_MANAGER_COMPLETE_EVENT</span>
<span class="c">     * @static</span>
<span class="c">     * @type string</span>
<span class="c">     * @final</span>
<span class="c">     */</span>
    <span class="nx">TEST_MANAGER_COMPLETE_EVENT</span> <span class="c">/*:String*/</span> <span class="o">:</span> <span class="s2">&quot;testmanagercomplete&quot;</span><span class="o">,</span>

    <span class="c">//-------------------------------------------------------------------------</span>
<span class="c"></span>    <span class="c">// Private Properties</span>
<span class="c"></span>    <span class="c">//-------------------------------------------------------------------------</span>
<span class="c"></span>    
    
    <span class="c">/**</span>
<span class="c">     * The URL of the page currently being executed.</span>
<span class="c">     * @type String</span>
<span class="c">     * @private</span>
<span class="c">     * @property _curPage</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">_curPage</span> <span class="c">/*:String*/</span> <span class="o">:</span> <span class="kc">null</span><span class="o">,</span>
    
    <span class="c">/**</span>
<span class="c">     * The frame used to load and run tests.</span>
<span class="c">     * @type Window</span>
<span class="c">     * @private</span>
<span class="c">     * @property _frame</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">_frame</span> <span class="c">/*:Window*/</span> <span class="o">:</span> <span class="kc">null</span><span class="o">,</span>
    
    <span class="c">/**</span>
<span class="c">     * The logger used to output results from the various tests.</span>
<span class="c">     * @type YAHOO.tool.TestLogger</span>
<span class="c">     * @private</span>
<span class="c">     * @property _logger</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">_logger</span> <span class="o">:</span> <span class="kc">null</span><span class="o">,</span>
    
    <span class="c">/**</span>
<span class="c">     * The timeout ID for the next iteration through the tests.</span>
<span class="c">     * @type int</span>
<span class="c">     * @private</span>
<span class="c">     * @property _timeoutId</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">_timeoutId</span> <span class="c">/*:int*/</span> <span class="o">:</span> <span class="m">0</span><span class="o">,</span>
    
    <span class="c">/**</span>
<span class="c">     * Array of pages to load.</span>
<span class="c">     * @type String[]</span>
<span class="c">     * @private</span>
<span class="c">     * @property _pages</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">_pages</span> <span class="c">/*:String[]*/</span> <span class="o">:</span> <span class="o">[],</span>
    
    <span class="c">/**</span>
<span class="c">     * Aggregated results</span>
<span class="c">     * @type Object</span>
<span class="c">     * @private</span>
<span class="c">     * @property _results</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">_results</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span>
    
    <span class="c">//-------------------------------------------------------------------------</span>
<span class="c"></span>    <span class="c">// Private Methods</span>
<span class="c"></span>    <span class="c">//-------------------------------------------------------------------------</span>
<span class="c"></span>    
    <span class="c">/**</span>
<span class="c">     * Handles TestRunner.COMPLETE_EVENT, storing the results and beginning</span>
<span class="c">     * the loop again.</span>
<span class="c">     * @param {Object} data Data about the event.</span>
<span class="c">     * @return {Void}</span>
<span class="c">     * @private</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">_handleTestRunnerComplete</span> <span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">data</span> <span class="c">/*:Object*/</span><span class="o">)</span> <span class="c">/*:Void*/</span> <span class="o">{</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">fireEvent</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">TEST_PAGE_COMPLETE_EVENT</span><span class="o">,</span> <span class="o">{</span>
                <span class="nx">page</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">_curPage</span><span class="o">,</span>
                <span class="nx">results</span><span class="o">:</span> <span class="nx">data</span><span class="o">.</span><span class="nx">results</span>
            <span class="o">});</span>
    
        <span class="c">//save results</span>
<span class="c"></span>        <span class="c">//this._results[this.curPage] = data.results;</span>
<span class="c"></span>        
        <span class="c">//process &#39;em</span>
<span class="c"></span>        <span class="k">this</span><span class="o">.</span><span class="nx">_processResults</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_curPage</span><span class="o">,</span> <span class="nx">data</span><span class="o">.</span><span class="nx">results</span><span class="o">);</span>
        
        <span class="k">this</span><span class="o">.</span><span class="nx">_logger</span><span class="o">.</span><span class="nx">clearTestRunner</span><span class="o">();</span>
    
        <span class="c">//if there&#39;s more to do, set a timeout to begin again</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_pages</span><span class="o">.</span><span class="nx">length</span><span class="o">){</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">_timeoutId</span> <span class="o">=</span> <span class="nx">setTimeout</span><span class="o">(</span><span class="k">function</span><span class="o">(){</span>
                <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">tool</span><span class="o">.</span><span class="nx">TestManager</span><span class="o">.</span><span class="nx">_run</span><span class="o">();</span>
            <span class="o">},</span> <span class="m">1000</span><span class="o">);</span>
        <span class="o">}</span>
    <span class="o">},</span>
    
    <span class="c">/**</span>
<span class="c">     * Processes the results of a test page run, outputting log messages</span>
<span class="c">     * for failed tests.</span>
<span class="c">     * @return {Void}</span>
<span class="c">     * @private</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">_processResults</span> <span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">page</span> <span class="c">/*:String*/</span><span class="o">,</span> <span class="nx">results</span> <span class="c">/*:Object*/</span><span class="o">)</span> <span class="c">/*:Void*/</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">r</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_results</span><span class="o">;</span>

        <span class="nx">r</span><span class="o">.</span><span class="nx">page_results</span><span class="o">[</span><span class="nx">page</span><span class="o">]</span> <span class="o">=</span> <span class="nx">results</span><span class="o">;</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">results</span><span class="o">.</span><span class="nx">passed</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">r</span><span class="o">.</span><span class="nx">pages_passed</span><span class="o">++;</span>
            <span class="nx">r</span><span class="o">.</span><span class="nx">tests_passed</span> <span class="o">+=</span> <span class="nx">results</span><span class="o">.</span><span class="nx">passed</span><span class="o">;</span>
        <span class="o">}</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">results</span><span class="o">.</span><span class="nx">failed</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">r</span><span class="o">.</span><span class="nx">pages_failed</span><span class="o">++;</span>
            <span class="nx">r</span><span class="o">.</span><span class="nx">tests_failed</span> <span class="o">+=</span> <span class="nx">results</span><span class="o">.</span><span class="nx">failed</span><span class="o">;</span>
            <span class="nx">r</span><span class="o">.</span><span class="nx">failed</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">page</span><span class="o">);</span>
        <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
            <span class="nx">r</span><span class="o">.</span><span class="nx">passed</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">page</span><span class="o">);</span>
        <span class="o">}</span>

        <span class="k">if</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">_pages</span><span class="o">.</span><span class="nx">length</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">fireEvent</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">TEST_MANAGER_COMPLETE_EVENT</span><span class="o">,</span> <span class="k">this</span><span class="o">.</span><span class="nx">_results</span><span class="o">);</span>
        <span class="o">}</span>

    <span class="o">},</span>
    
    <span class="c">/**</span>
<span class="c">     * Loads the next test page into the iframe.</span>
<span class="c">     * @return {Void}</span>
<span class="c">     * @static</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">_run</span> <span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="c">/*:Void*/</span> <span class="o">{</span>
    
        <span class="c">//set the current page</span>
<span class="c"></span>        <span class="k">this</span><span class="o">.</span><span class="nx">_curPage</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_pages</span><span class="o">.</span><span class="nx">shift</span><span class="o">();</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">fireEvent</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">TEST_PAGE_BEGIN_EVENT</span><span class="o">,</span> <span class="k">this</span><span class="o">.</span><span class="nx">_curPage</span><span class="o">);</span>
        
        <span class="c">//load the frame - destroy history in case there are other iframes that</span>
<span class="c"></span>        <span class="c">//need testing</span>
<span class="c"></span>        <span class="k">this</span><span class="o">.</span><span class="nx">_frame</span><span class="o">.</span><span class="nx">location</span><span class="o">.</span><span class="nx">replace</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_curPage</span><span class="o">);</span>
    
    <span class="o">},</span>
        
    <span class="c">//-------------------------------------------------------------------------</span>
<span class="c"></span>    <span class="c">// Public Methods</span>
<span class="c"></span>    <span class="c">//-------------------------------------------------------------------------</span>
<span class="c"></span>    
    <span class="c">/**</span>
<span class="c">     * Signals that a test page has been loaded. This should be called from</span>
<span class="c">     * within the test page itself to notify the TestManager that it is ready.</span>
<span class="c">     * @return {Void}</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">load</span> <span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="c">/*:Void*/</span> <span class="o">{</span>
        <span class="k">if</span> <span class="o">(</span><span class="nx">parent</span><span class="o">.</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">tool</span><span class="o">.</span><span class="nx">TestManager</span> <span class="o">!==</span> <span class="k">this</span><span class="o">){</span>
            <span class="nx">parent</span><span class="o">.</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">tool</span><span class="o">.</span><span class="nx">TestManager</span><span class="o">.</span><span class="nx">load</span><span class="o">();</span>
        <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
            
            <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_frame</span><span class="o">)</span> <span class="o">{</span>
                <span class="c">//assign event handling</span>
<span class="c"></span>                <span class="k">var</span> <span class="nx">TestRunner</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_frame</span><span class="o">.</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">tool</span><span class="o">.</span><span class="nx">TestRunner</span><span class="o">;</span>

                <span class="k">this</span><span class="o">.</span><span class="nx">_logger</span><span class="o">.</span><span class="nx">setTestRunner</span><span class="o">(</span><span class="nx">TestRunner</span><span class="o">);</span>
                <span class="nx">TestRunner</span><span class="o">.</span><span class="nx">subscribe</span><span class="o">(</span><span class="nx">TestRunner</span><span class="o">.</span><span class="nx">COMPLETE_EVENT</span><span class="o">,</span> <span class="k">this</span><span class="o">.</span><span class="nx">_handleTestRunnerComplete</span><span class="o">,</span> <span class="k">this</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>
                
                <span class="c">//run it</span>
<span class="c"></span>                <span class="nx">TestRunner</span><span class="o">.</span><span class="nx">run</span><span class="o">();</span>
            <span class="o">}</span>
        <span class="o">}</span>
    <span class="o">},</span>
    
    <span class="c">/**</span>
<span class="c">     * Sets the pages to be loaded.</span>
<span class="c">     * @param {String[]} pages An array of URLs to load.</span>
<span class="c">     * @return {Void}</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">setPages</span> <span class="o">:</span> <span class="k">function</span> <span class="o">(</span><span class="nx">pages</span> <span class="c">/*:String[]*/</span><span class="o">)</span> <span class="c">/*:Void*/</span> <span class="o">{</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">_pages</span> <span class="o">=</span> <span class="nx">pages</span><span class="o">;</span>
    <span class="o">},</span>
    
    <span class="c">/**</span>
<span class="c">     * Begins the process of running the tests.</span>
<span class="c">     * @return {Void}</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">start</span> <span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="c">/*:Void*/</span> <span class="o">{</span>

        <span class="k">if</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">_initialized</span><span class="o">)</span> <span class="o">{</span>

            <span class="c">/**</span>
<span class="c">             * Fires when loading a test page</span>
<span class="c">             * @event testpagebegin</span>
<span class="c">             * @param curPage {string} the page being loaded</span>
<span class="c">             * @static</span>
<span class="c">             */</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">createEvent</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">TEST_PAGE_BEGIN_EVENT</span><span class="o">);</span>

            <span class="c">/**</span>
<span class="c">             * Fires when a test page is complete</span>
<span class="c">             * @event testpagecomplete</span>
<span class="c">             * @param obj {page: string, results: object} the name of the</span>
<span class="c">             * page that was loaded, and the test suite results</span>
<span class="c">             * @static</span>
<span class="c">             */</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">createEvent</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">TEST_PAGE_COMPLETE_EVENT</span><span class="o">);</span>

            <span class="c">/**</span>
<span class="c">             * Fires when the test manager starts running all test pages</span>
<span class="c">             * @event testmanagerbegin</span>
<span class="c">             * @static</span>
<span class="c">             */</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">createEvent</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">TEST_MANAGER_BEGIN_EVENT</span><span class="o">);</span>

            <span class="c">/**</span>
<span class="c">             * Fires when the test manager finishes running all test pages.  External</span>
<span class="c">             * test runners should subscribe to this event in order to get the</span>
<span class="c">             * aggregated test results.</span>
<span class="c">             * @event testmanagercomplete</span>
<span class="c">             * @param obj { pages_passed: int, pages_failed: int, tests_passed: int</span>
<span class="c">             *              tests_failed: int, passed: string[], failed: string[],</span>
<span class="c">             *              page_results: {} }</span>
<span class="c">             * @static</span>
<span class="c">             */</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">createEvent</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">TEST_MANAGER_COMPLETE_EVENT</span><span class="o">);</span>

            <span class="c">//create iframe if not already available</span>
<span class="c"></span>            <span class="k">if</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">_frame</span><span class="o">){</span>
                <span class="k">var</span> <span class="nx">frame</span> <span class="c">/*:HTMLElement*/</span> <span class="o">=</span> <span class="nb">document</span><span class="o">.</span><span class="nx">createElement</span><span class="o">(</span><span class="s2">&quot;iframe&quot;</span><span class="o">);</span>
                <span class="nx">frame</span><span class="o">.</span><span class="nx">style</span><span class="o">.</span><span class="nx">visibility</span> <span class="o">=</span> <span class="s2">&quot;hidden&quot;</span><span class="o">;</span>
                <span class="nx">frame</span><span class="o">.</span><span class="nx">style</span><span class="o">.</span><span class="nx">position</span> <span class="o">=</span> <span class="s2">&quot;absolute&quot;</span><span class="o">;</span>
                <span class="nb">document</span><span class="o">.</span><span class="nx">body</span><span class="o">.</span><span class="nx">appendChild</span><span class="o">(</span><span class="nx">frame</span><span class="o">);</span>
                <span class="k">this</span><span class="o">.</span><span class="nx">_frame</span> <span class="o">=</span> <span class="nx">frame</span><span class="o">.</span><span class="nx">contentWindow</span> <span class="o">||</span> <span class="nx">frame</span><span class="o">.</span><span class="nx">contentDocument</span><span class="o">.</span><span class="nx">ownerWindow</span><span class="o">;</span>
            <span class="o">}</span>
            
            <span class="c">//create test logger if not already available</span>
<span class="c"></span>            <span class="k">if</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">_logger</span><span class="o">){</span>
                <span class="k">this</span><span class="o">.</span><span class="nx">_logger</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">tool</span><span class="o">.</span><span class="nx">TestLogger</span><span class="o">();</span>
            <span class="o">}</span>

            <span class="k">this</span><span class="o">.</span><span class="nx">_initialized</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
        <span class="o">}</span>


        <span class="c">// reset the results cache</span>
<span class="c"></span>        <span class="k">this</span><span class="o">.</span><span class="nx">_results</span> <span class="o">=</span> <span class="o">{</span>
            <span class="c">// number of pages that pass</span>
<span class="c"></span>            <span class="nx">pages_passed</span><span class="o">:</span> <span class="m">0</span><span class="o">,</span>
            <span class="c">// number of pages that fail</span>
<span class="c"></span>            <span class="nx">pages_failed</span><span class="o">:</span> <span class="m">0</span><span class="o">,</span>
            <span class="c">// total number of tests passed</span>
<span class="c"></span>            <span class="nx">tests_passed</span><span class="o">:</span> <span class="m">0</span><span class="o">,</span>
            <span class="c">// total number of tests failed</span>
<span class="c"></span>            <span class="nx">tests_failed</span><span class="o">:</span> <span class="m">0</span><span class="o">,</span>
            <span class="c">// array of pages that passed</span>
<span class="c"></span>            <span class="nx">passed</span><span class="o">:</span> <span class="o">[],</span>
            <span class="c">// array of pages that failed</span>
<span class="c"></span>            <span class="nx">failed</span><span class="o">:</span> <span class="o">[],</span>
            <span class="c">// map of full results for each page</span>
<span class="c"></span>            <span class="nx">page_results</span><span class="o">:</span> <span class="o">{}</span>
        <span class="o">};</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">fireEvent</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">TEST_MANAGER_BEGIN_EVENT</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">_run</span><span class="o">();</span>
    
    <span class="o">},</span>

    <span class="c">/**</span>
<span class="c">     * Stops the execution of tests.</span>
<span class="c">     * @return {Void}</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">stop</span> <span class="o">:</span> <span class="k">function</span> <span class="o">()</span> <span class="c">/*:Void*/</span> <span class="o">{</span>
        <span class="nx">clearTimeout</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_timeoutId</span><span class="o">);</span>
    <span class="o">}</span>

<span class="o">};</span>

<span class="nx">YAHOO</span><span class="o">.</span><span class="nx">lang</span><span class="o">.</span><span class="nx">augmentObject</span><span class="o">(</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">tool</span><span class="o">.</span><span class="nx">TestManager</span><span class="o">,</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">EventProvider</span><span class="o">.</span><span class="nx">prototype</span><span class="o">);</span>
</pre></div>
                    </div>
			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div class="module">
                        <h4>Modules</h4>
                        <ul class="content">

                                <li class=""><a href="module_animation.html">animation</a></li>

                                <li class=""><a href="module_autocomplete.html">autocomplete</a></li>

                                <li class=""><a href="module_button.html">button</a></li>

                                <li class=""><a href="module_calendar.html">calendar</a></li>

                                <li class=""><a href="module_colorpicker.html">colorpicker</a></li>

                                <li class=""><a href="module_connection.html">connection</a></li>

                                <li class=""><a href="module_container.html">container</a></li>

                                <li class=""><a href="module_datasource.html">datasource</a></li>

                                <li class=""><a href="module_datatable.html">datatable</a></li>

                                <li class=""><a href="module_dom.html">dom</a></li>

                                <li class=""><a href="module_dragdrop.html">dragdrop</a></li>

                                <li class=""><a href="module_editor.html">editor</a></li>

                                <li class=""><a href="module_element.html">element</a></li>

                                <li class=""><a href="module_event.html">event</a></li>

                                <li class=""><a href="module_history.html">history</a></li>

                                <li class=""><a href="module_imageloader.html">imageloader</a></li>

                                <li class=""><a href="module_logger.html">logger</a></li>

                                <li class=""><a href="module_menu.html">menu</a></li>

                                <li class=""><a href="module_slider.html">slider</a></li>

                                <li class=""><a href="module_tabview.html">tabview</a></li>

                                <li class=""><a href="module_treeview.html">treeview</a></li>

                                <li class=""><a href="module_yahoo.html">yahoo</a></li>

                                <li class=""><a href="module_yuiloader.html">yuiloader</a></li>

                                <li class="selected"><a href="module_yuitest.html">yuitest</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="YAHOO.tool.TestCase.html">YAHOO.tool.TestCase</a></li>
                                <li class=""><a href="YAHOO.tool.TestLogger.html">YAHOO.tool.TestLogger</a></li>
                                <li class=""><a href="YAHOO.tool.TestManager.html">YAHOO.tool.TestManager</a></li>
                                <li class=""><a href="YAHOO.tool.TestRunner.html">YAHOO.tool.TestRunner</a></li>
                                <li class=""><a href="YAHOO.tool.TestSuite.html">YAHOO.tool.TestSuite</a></li>
                                <li class=""><a href="YAHOO.util.ArrayAssert.html">YAHOO.util.ArrayAssert</a></li>
                                <li class=""><a href="YAHOO.util.Assert.html">YAHOO.util.Assert</a></li>
                                <li class=""><a href="YAHOO.util.AssertionError.html">YAHOO.util.AssertionError</a></li>
                                <li class=""><a href="YAHOO.util.ComparisonFailure.html">YAHOO.util.ComparisonFailure</a></li>
                                <li class=""><a href="YAHOO.util.DateAssert.html">YAHOO.util.DateAssert</a></li>
                                <li class=""><a href="YAHOO.util.ObjectAssert.html">YAHOO.util.ObjectAssert</a></li>
                                <li class=""><a href="YAHOO.util.ShouldError.html">YAHOO.util.ShouldError</a></li>
                                <li class=""><a href="YAHOO.util.ShouldFail.html">YAHOO.util.ShouldFail</a></li>
                                <li class=""><a href="YAHOO.util.UnexpectedError.html">YAHOO.util.UnexpectedError</a></li>
                                <li class=""><a href="YAHOO.util.UnexpectedValue.html">YAHOO.util.UnexpectedValue</a></li>
                                <li class=""><a href="YAHOO.util.UserAction.html">YAHOO.util.UserAction</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class=""><a href="ArrayAssert.js.html">ArrayAssert.js</a></li>
                                <li class=""><a href="Assert.js.html">Assert.js</a></li>
                                <li class=""><a href="DateAssert.js.html">DateAssert.js</a></li>
                                <li class=""><a href="ObjectAssert.js.html">ObjectAssert.js</a></li>
                                <li class=""><a href="TestCase.js.html">TestCase.js</a></li>
                                <li class=""><a href="TestLogger.js.html">TestLogger.js</a></li>
                                <li class="selected"><a href="TestManager.js.html">TestManager.js</a></li>
                                <li class=""><a href="TestRunner.js.html">TestRunner.js</a></li>
                                <li class=""><a href="TestSuite.js.html">TestSuite.js</a></li>
                                <li class=""><a href="UserAction.js.html">UserAction.js</a></li>
                        </ul>
                    </div>





            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2007 Yahoo! Inc. All rights reserved.
	</div>
</div>
</body>
</html>
